package com.song.util;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONObject;

import java.util.Map;

public class HolidayUtil {
    private final static String holidayUrl = "http://timor.tech/api/holiday/year/";

    public static Map<String, Object> queryHolidays(String date){
        String holidays = HttpUtil.get(holidayUrl + date);
        return JSONObject.parseObject(holidays, Map.class);
    }
}
